package com.trafficsys.modules.loginAndRegister.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.trafficsys.modules.entity.DriveCard;
import com.trafficsys.modules.entity.Driver;
import com.trafficsys.modules.entity.TravelCard;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author Zhao Bin
 * @Date 2021/9/27 10:31
 * @Version 1.0
 */
@Mapper
@Repository
public interface TravelCardDao extends BaseMapper<TravelCard> {
    @Select("select * from travel_card where card_id = #{cardId}")
    List<TravelCard> getTravelCardByCardId(@Param("cardId") String cardId);
    //分页查询行驶证
    @Select("select * from  travel_card where card_id = ${cardId}")
    IPage<TravelCard> getTravelCardByCardId(IPage<TravelCard> page, @Param("cardId") String cardId);
}
